﻿<UserControl x:Class="HDViewSL.Page"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	d:DesignWidth="473"
	d:DesignHeight="263"
	Foreground="#FFFFFF00">
	<UserControl.Resources>
		<Style x:Key="iconButtonStyle" TargetType="ButtonBase">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ButtonBase">
						<Grid x:Name="Root" Width="30" Height="30">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="FocusStates">
									<vsm:VisualState x:Name="Unfocused"/>
									<vsm:VisualState x:Name="Focused"/>
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Normal">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Pressed"/>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Rectangle x:Name="Highlight" Fill="#FFFFFF00"/>
							<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Grid x:Name="layoutRoot" Background="Black">
		<vsm:VisualStateManager.VisualStateGroups>
			<vsm:VisualStateGroup x:Name="CommonStates">
				<vsm:VisualStateGroup.Transitions>
					<vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
				</vsm:VisualStateGroup.Transitions>
				<vsm:VisualState x:Name="Normal">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="toolbar" Storyboard.TargetProperty="(UIElement.Opacity)">
							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.33"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</vsm:VisualState>
				<vsm:VisualState x:Name="MouseOverToolbar">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="toolbar" Storyboard.TargetProperty="(UIElement.Opacity)">
							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</vsm:VisualState>
			</vsm:VisualStateGroup>
		</vsm:VisualStateManager.VisualStateGroups>
		<TextBlock x:Name="messageTextBlock" Text="This HTML page does not specify a source image." FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" TextWrapping="Wrap" UseLayoutRounding="False"/>
		<MultiScaleImage x:Name="multiScaleImage"/>
		<Border HorizontalAlignment="Right" Margin="2,2,2,2" VerticalAlignment="Top" x:Name="toolbar" BorderBrush="#FFFFFF00" Background="#FFDCDCFF" BorderThickness="1,1,1,1" Opacity="0.33" Canvas.ZIndex="2">
			<StackPanel>
				<Button x:Name="fullScreenButton" Style="{StaticResource iconButtonStyle}" ToolTipService.ToolTip="Enter full screen (F)" IsTabStop="False">
					<Image Source="Images/FullScreen.png" Stretch="None"/>
				</Button>
				<Button x:Name="homeButton" Style="{StaticResource iconButtonStyle}" ToolTipService.ToolTip="Show entire image (Home)" IsTabStop="False">
					<Image Source="Images/Home.png" Stretch="None"/>
				</Button>
				<RepeatButton x:Name="zoomInButton" Style="{StaticResource iconButtonStyle}" ToolTipService.ToolTip="Zoom in (Page Up)" IsTabStop="False">
					<Image Source="Images/ZoomIn.png" Stretch="None"/>
				</RepeatButton>
				<RepeatButton x:Name="zoomOutButton" Style="{StaticResource iconButtonStyle}" ToolTipService.ToolTip="Zoom out (Page Down)" IsTabStop="False">
					<Image Source="Images/ZoomOut.png" Stretch="None"/>
				</RepeatButton>
			</StackPanel>
		</Border>
	</Grid>
</UserControl>
